package ClassesFieldsMethods;

import java.util.Scanner;

public class Auction 
{

	//Create an auction. The action can have N cars.
	//the auction can have up to N participants.
	//The auction opens.
	//Each participant can buy 1 or 2 cars.
	//Each participant decides weather to buy a car by a random boolean value.
	//Cars can be bought only once.
	//If no other cars are left in the auction, the remaining participants go home.
	//After all participants have decided OR all cars are sold, the auction closes.
	//If after all sales there are still cars left, the cars are scrapped.
	
	//Input: number of cars, number of participants.
	//Output: 1. All participants that bought a car and the model of their cars.
	//2. All scrapped cars if any.

			
			public void auctionOpens()
			{
			
				System.out.println("The auction opens!");
				System.out.println();
				
				
			}
			void fillPersons()
			{
				Scanner sc = new Scanner(System.in);
				System.out.println("Enter number of participants: ");
				int numParticipants = sc.nextInt();
				String [] participants = new String[numParticipants];
				for (int i = 0; i < participants.length; i++) 
				{
					System.out.println("Enter name of person " + (i + 1) + ": ");
					participants[i] = sc.next();
				}
				sc.close();
			}
			public void fillCars()
			{
				Scanner sc = new Scanner(System.in);
				
				System.out.println("Enter number of cars: ");
				int numCars = sc.nextInt();
				String [] cars = new String[numCars];
				for (int i = 0; i < cars.length; i++) 
				{
					System.out.println("Enter model of car " + (i + 1) + ": ");
					cars[i] = sc.next();
				}
				
				sc.close();
				
			}

}
	
	
	
